In [3]:
%matplotlib inline
import matplotlib.pyplot as plt
In [13]:
X = [1,2,3]
Y = [5,6,1]
plt.plot(X, Y)
plt.show()
In [14]:
X = [1,2,3,4,9,3,7,1,2,8,5]
Y = [5,6,1,1,4,7,5,4,6,8,2]
plt.plot(X, Y,'*')
plt.show()
In [22]:
def f(x):
return x**2
X = [i for i in range(-10,11)]
Y = [f(x) for x in X]
plt.plot(X,Y)
plt.show()
In [8]:
from random import randint
amount_points = 30
X = [i for i in range(amount_points)]
Y = [randint(0,9) for i in range(amount_points)]
plt.plot(X,Y,'.')
plt.show()